package com.umgsai.thread.thread01;

public class MyThread20 extends Thread {

	@Override
	public void run() {
		long beginTime = System.currentTimeMillis();
		System.out.println(beginTime);
		int count = 0;
		for (int i = 0; i < 500000000; i++) {
//			Thread.yield();
			count = count + i;
		}
		long endTime = System.currentTimeMillis();
		System.out.println(endTime);
		System.out.println("用时：" + (endTime - beginTime) + "ms");
	}
	
	public static void main(String[] args) {
		System.out.println(System.currentTimeMillis());
		MyThread20 thread = new MyThread20();
		thread.start();
	}
}
